package com.imchen.cms.cmscore.dao;

import com.imchen.cms.cmscore.model.Article;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;


import java.util.List;

@Repository
public interface ArticleMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Article record);

    int insertSelective(Article record);

    Article selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Article record);

    int updateByPrimaryKey(Article record);

    List<Article> selectArticles(@Param("currentIndex") Integer currentIndex, @Param("pageSize") Integer pageSize);

    int deleteByPrimaryKeyLogic(@Param("id") Integer id, @Param("isDelete") Integer isDelete);

    List<Article> selectAllArticles(@Param("tags") String tags);

    List<Article> selectAllArticlesByTag(String tags);

}